@SpringBootTest
class CartListMapperTest {

    @Autowired
    private CartListMapper cartListMapper;

    @Test
    void addCartLists(){
        CartList cartList = new CartList();
        cartList.setUserId(77);
        cartList.setCreateTime(new Date());
        cartList.setPrice(2.0);
        cartList.setSongId(1);
        cartListMapper.insert(cartList);
    }

    @Test
    void selectCartLists() {
        CartList cartList = new CartList();
        cartList.setUserId(77);
        List<CartListRespo> cartListRespos = cartListMapper.selectCartLists(cartList);
        cartListRespos.forEach(c -> System.out.println(c.getSongName()));
    }

    @Test
    void delCartListBySongId() {
        List<Integer> clistIds = new ArrayList<>();
        clistIds.add(11);
        clistIds.add(9);
        cartListMapper.delCartListBySongId(76, clistIds);
    }
}
